{__NOLAYOUT__}<html xmlns:msie>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>歌词同步播放</title>
<STYLE type="text/css">
<!--
.style1 {
	FONT-SIZE: 12px
}
.style2 {
	COLOR: #ffffff
}

TD {
	FONT-SIZE: 9pt; LINE-HEIGHT: 20px
}
BODY {
	FONT-SIZE: 9pt; MARGIN: 0px; LINE-HEIGHT: 20px
}
#lrcollbox TD { font-family: "标楷体"; font-size: 12px;; 	     }
#lrcollbox FONT { font-family: "标楷体"; font-size: 12px;; 	     }
#lrcoll td 			{ color:#FFFFFF 			  	     }
#lrcbox 			{ color:#00FF00;font-size: 14px;font-weight: bolder; }
#lrcfilter 			{ filter: alpha(opacity=0)	  	             }
.lrcbc              {color:#FFFF33;font-size: 14px;font-weight: bold;                   }
A:visited {
	COLOR: #000000; TEXT-DECORATION: none
}
A:active {
	COLOR: #000000; TEXT-DECORATION: none
}
A:link {
	COLOR: #000000; TEXT-DECORATION: none
}
#idDownload {
	BEHAVIOR: url(#default#download)
}
A:hover {
	COLOR: #74acdc; TEXT-DECORATION: underline
}
body {
	/* background-image: url(); */
}
#lrcollbox td , #lrcollbox font { font-family: "标楷体"; font-size: 12px;; 	     }
#lrcoll td 			{ color:#FFFFFF 			  	     }
#lrcbox 			{ color:#00FF00;font-size: 14px;font-weight: bolder; }
#lrcfilter 			{ filter: alpha(opacity=0)	  	             }
#lrcbc 				{ color:#FFFF33;font-size: 14px;font-weight: bold;   }
#lrcwt1,#lrcwt5 		{ filter: alpha(opacity=100) 			     }
#idDownload 			{behavior:url(#default#download);		     }
A:visited 			{ TEXT-DECORATION: none;color: #000000; 	     }
A:active 			{ COLOR: #ff0000; TEXT-DECORATION: none; 	     }
A:link 				{ TEXT-DECORATION:none ; Color:#000000		     }
A:hover				{ TEXT-DECORATION: underline; Color:#74ACDC 	     }
-->
</STYLE>
<script language="JavaScript">
    function getHttpObject() {
        var objType = false;
        try {
            objType = new ActiveXObject('Msxml2.XMLHTTP');
        } catch (e) {
            try {
                objType = new ActiveXObject('Microsoft.XMLHTTP');
            } catch (e) {
                objType = new XMLHttpRequest();
            }
        }
        return objType;
    }
    function setLyricsRun() {
        var theHttpRequest = getHttpObject();
        var remoteURL = sPath + 'lyrics.asp?id=1' + '&t=' + (new Date().getTime()) + '';
        theHttpRequest.open("GET", remoteURL, true);
        theHttpRequest.send(null);
        theHttpRequest.onreadystatechange = function() { processAJAX(); };
        function processAJAX() {
            if (theHttpRequest.readyState == 4) {
                if (theHttpRequest.status == 200) {
                    try{
						LrcRun(toUnicode(theHttpRequest.responseText));
					} catch(e) {}
                }
                else {
                    alert("网络链接失败");
                }
            }
        }
    }
	function toGB(objv){ //转为GB2312 ( 我们 = &#x6211;&#x4EEC; = \u6211\u4eec)
		objv = unescape(objv.replace(/&#x([a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]);/g,'%u$1'));
		objv = unescape(objv.replace(/\\u([a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9])/g,'%u$1'));
		return objv;
	}
	function toUnicode(objv){ //转为Unicode ( &#X6211;&#X4EEC; = 我们 )
		objv = objv.replace(/[^\u0000-\u00FF]/gi,function($0){return escape($0).replace(/(%u)(\w{4})/gi,"&#x$2;")});
		//if (/[\u0000-\u00ff]/g.test(objv))
		objv = objv.replace(/\\u([a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9])/gi,'&#x$1;');
		objv = replaceRegUpperCase(/&#x\w{4}/g,objv);
		objv = objv.replace(/(&#X)(\w{4});/g,"&#x$2;");
		return objv;
	}
	function toJSUnicode(objv){ //转为Unicode ( &#X6211;&#X4EEC; = 我们 )
		objv = objv.replace(/[^\u0000-\u00FF]/gi,function($0){return escape($0).replace(/(%u)(\w{4})/gi,"\\u$2")});
		objv = objv.replace(/&#x([a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]);/gi,'\\u$1');
		objv = replaceRegLowerCase(/\\u\w{4}/g,objv);
		return objv;
	}
	function replaceRegLowerCase(reg,str){ 
		//str = str.toLowerCase(); 
		return str.replace(reg,function(m){return m.toLowerCase()}) 
	}
	function replaceRegUpperCase(reg,str){ 
		//str = str.toUpperCase(); 
		return str.replace(reg,function(m){return m.toUpperCase()}) 
	}
	var Browser = { //判断浏览器信息
		isIE : (window.ActiveXObject ? true : false /*-1 != navigator.userAgent.indexOf('MSIE')*/ ),
		isFF : (-1 != navigator.userAgent.indexOf("Firefox")),
		isChrome : (-1 != navigator.userAgent.indexOf("Chrome")),
		isSafari : ( /safari/.test(window.navigator.userAgent.toLowerCase()) ),
		isOpera : ( /opera/.test(window.navigator.userAgent.toLowerCase()) ),
		isMoz : ( /* /gecko/.test(window.navigator.userAgent.toLowerCase()) */ (typeof document.implementation != 'undefined') && (typeof document.implementation.createDocument != 'undefined') && (typeof HTMLDocument!='undefined') )
	};
	var userBrowser = function(){ //js浏览器判断函数
		var browserName=navigator.userAgent.toLowerCase();
		if(/msie/i.test(browserName) && !/opera/.test(browserName)){ //IE
			return "ie";
		}else if(/firefox/i.test(browserName)){ //Firefox
			return "firefox";
		}else if(/chrome/i.test(browserName) && /webkit/i.test(browserName) && /mozilla/i.test(browserName)){ //Chrome
			return "chrome";
		}else if(/opera/i.test(browserName)){ //Opera
			return "opera";
		}else if(/webkit/i.test(browserName) &&!(/chrome/i.test(browserName) && /webkit/i.test(browserName) && /mozilla/i.test(browserName))){ //Safari
			return "safari";
		}else{ //unknown
			return "";
		}
	}
</script>
<script language="JavaScript">
<!--
var playerobj = 0;
{if req('player')='media'}
  playerobj = 0;
{elseif req('player')='real'}
  playerobj = 1;
{else}
  playerobj = 0;
{/if}
//-->
</script>
<script language="JavaScript">
<!--
var realLen = function(str) { //获得字符串实际长度[固定长度], 中文2, 英文1
	var realLength = 0, len = str.length, charCode = -1;
	for (var i = 0; i < len; i++) {
		charCode = str.charCodeAt(i);
		if (charCode >= 0 && charCode <= 128) realLength += 1;
		else realLength += 2;
	}
	return realLength;
};

function widthSplit(name, maxLength){ //按字符宽度截取字符串
		if(!maxLength){
			maxLength = 20;
		}
		if(name==null||name.length<1){
			return ["", ""];
		}
		var w = 0;//字符串长度，一个汉字长度为2
		var s = 0;//汉字个数
		var p = false;//判断字符串当前循环的前一个字符是否为汉字
		var b = false;//判断字符串当前循环的字符是否为汉字
		var nameSub;
		for (var i=0; i<name.length; i++) {
		   if(i>1 && b==false){
		   		p = false;
		   }
		   if(i>1 && b==true){
		   		p = true;
		   }
		   var c = name.charCodeAt(i);
		   //单字节加1
		   if ((c >= 0x0001 && c <= 0x007e) || (0xff60<=c && c<=0xff9f)) {
		    	w++;
		    	b = false;
		   }else {
		    	w+=2;
		    	s++;
		    	b = true;
		   }
		   if(w>maxLength && i<=name.length-1){
		   		if(b==true && p==true){
		   			nameSub = name.substring(0,i-2)+"";
		   		}
		   		if(b==false && p==false){
		   			nameSub = name.substring(0,i-3)+"";
		   		}
		   		if(b==true && p==false){
		   			nameSub = name.substring(0,i-2)+"";
		   		}
		   		if(p==true){
		   			nameSub = name.substring(0,i-2)+"";
		   		}
		   		break;
		   }
		}
		if(w<=maxLength){
			return name;
		}
		return nameSub;
}

function lrcClass(tt)		//LRC歌词处理 类
{
  this.inr = [];		//行
  this.oTime = 0;		//余补时间
  this.hailang;
  this.dts = -1;		//当前行显示的s
  this.dte = -1;		//当前行显示的e
  this.dlt = -1;		//当前行
  this.ddh;			//当前行数据
  this.fjh;
  this.haohaiplay;
  this.oceanx;
  this.cnane;
  this.playptr = 0;
//以上几个属性是为了判断是否还在上次显示的时间范围，以减少循环次数


  if(/\[offset\:(\-?\d+)\]/i.test(tt))		//取offset余补时间
	this.oTime = RegExp.$1/1000;
  tt = tt.replace(/\[\:\][^$\n]*(\n|$)/g,"$1");		//去掉注解
  tt = tt.replace(/\[[^\[\]\:]*\]/g,"");
  tt = tt.replace(/\[[^\[\]]*[^\[\]\d]+[^\[\]]*\:[^\[\]]*\]/g,"");
  tt = tt.replace(/\[[^\[\]]*\:[^\[\]]*[^\[\]\d\.]+[^\[\]]*\]/g,"");
  tt = tt.replace(/<[^<>]*[^<>\d]+[^<>]*\:[^<>]*>/g,"");
  tt = tt.replace(/<[^<>]*\:[^<>]*[^<>\d\.]+[^<>]*>/g,"");		//去掉除时间标签的其它标签

  while(/\[[^\[\]]+\:[^\[\]]+\]/.test(tt))
  {
    tt = tt.replace(/((\[[^\[\]]+\:[^\[\]]+\])+[^\[\r\n]*)[^\[]*/,"\n");
    var zzzt = RegExp.$1;
    /^(.+\])([^\]]*)$/.exec(zzzt);
    var ltxt = RegExp.$2;
    var eft = RegExp.$1.slice(1,-1).split("][");
    for(var ii=0; ii<eft.length; ii++)
    {
      var sf = eft[ii].split(":");
      var tse = parseInt(sf[0],10) * 60 + parseFloat(sf[1]);
      var sso = { t:[] , w:[] , n:ltxt }
      sso.t[0] = tse-this.oTime;
      this.inr[this.inr.length] = sso;
    }
  }
  this.inr = this.inr.sort( function(a,b){return a.t[0]-b.t[0];} );

  for(var ii=0; ii<this.inr.length; ii++)
  {
    while(/<[^<>]+\:[^<>]+>/.test(this.inr[ii].n))
    {
      this.inr[ii].n = this.inr[ii].n.replace(/<(\d+)\:([\d\.]+)>/,"%=%");
      var tse = parseInt(RegExp.$1,10) * 60 + parseFloat(RegExp.$2);
      this.inr[ii].t[this.inr[ii].t.length] = tse-this.oTime;
    }

    lrcbc.innerHTML = "<font>"+ this.inr[ii].n +" </font>"; //几行显示的歌词输出
	
    var fall = lrcbc.getElementsByTagName("font");
    for(var wi=0; wi<fall.length; wi++)
	  this.inr[ii].w[this.inr[ii].w.length] = fall[wi].offsetWidth;
    this.inr[ii].n = lrcbc.innerText;
  }

  this.print("歌词加载中..");
  lrcwt1.innerText = "";
  lrcwt2.innerText = "";
  lrcwt3.innerText = "";
  lrcwt4.innerText = "";
  lrcwt5.innerText = "";
  lrcwt6.innerText = "";
  lrcwt7.innerText = "";
  lrcwt8.innerText = "";
  lrcwt9.innerText = "";
  lrcwt10.innerText = "";
  lrcbc.style.width = 0;
}

lrcClass.prototype.run = function()
{
  try {
    if(this.oceanx==0)
      this.runing(this.haohaiplay.controls.currentPosition+this.playptr, this.haohaiplay.currentMedia.duration);
    else
      this.runing((this.haohaiplay.GetPosition()/1000)+this.playptr, this.haohaiplay.GetLength()/1000);
  } catch(hh){}
}

lrcClass.prototype.runing = function(tme, plen)
{
  if(tme<this.dts || tme>=this.dte)
  {
    var ii;
    for(ii=this.inr.length-1; ii>=0 && this.inr[ii].t[0]>tme; ii--){}
    if(ii<0) return;
    this.ddh = this.inr[ii].t;
    this.fjh = this.inr[ii].w;
    this.dts = this.inr[ii].t[0];
    this.dte = (ii<this.inr.length-1)?this.inr[ii+1].t[0]:plen;

	/*
      lrcwt1.innerText = this.retxt(ii-5);
      lrcwt2.innerText = this.retxt(ii-4);
      lrcwt3.innerText = this.retxt(ii-3);
      lrcwt4.innerText = this.retxt(ii-2);
      lrcwt5.innerText = this.retxt(ii-1);
      lrcwt6.innerText = this.retxt(ii+1);
      lrcwt7.innerText = this.retxt(ii+2);
      lrcwt8.innerText = this.retxt(ii+3);
      lrcwt9.innerText = this.retxt(ii+4);
      lrcwt10.innerText = this.retxt(ii+5);
	  */
      lrcwt1.innerText = (realLen(this.retxt(ii-5))>64)?widthSplit(this.retxt(ii-5),64):this.retxt(ii-5);
      lrcwt2.innerText = (realLen(this.retxt(ii-4))>64)?widthSplit(this.retxt(ii-4),64):this.retxt(ii-4);
      lrcwt3.innerText = (realLen(this.retxt(ii-3))>64)?widthSplit(this.retxt(ii-3),64):this.retxt(ii-3);
      lrcwt4.innerText = (realLen(this.retxt(ii-2))>64)?widthSplit(this.retxt(ii-2),64):this.retxt(ii-2);
      lrcwt5.innerText = (realLen(this.retxt(ii-1))>64)?widthSplit(this.retxt(ii-1),64):this.retxt(ii-1);
      lrcwt6.innerText = (realLen(this.retxt(ii+1))>64)?widthSplit(this.retxt(ii+1),64):this.retxt(ii+1);
      lrcwt7.innerText = (realLen(this.retxt(ii+2))>64)?widthSplit(this.retxt(ii+2),64):this.retxt(ii+2);
      lrcwt8.innerText = (realLen(this.retxt(ii+3))>64)?widthSplit(this.retxt(ii+3),64):this.retxt(ii+3);
      lrcwt9.innerText = (realLen(this.retxt(ii+4))>64)?widthSplit(this.retxt(ii+4),64):this.retxt(ii+4);
      lrcwt10.innerText = (realLen(this.retxt(ii+5))>64)?widthSplit(this.retxt(ii+5),64):this.retxt(ii+5);

	
      //this.print(nowline);
      this.print((realLen(this.retxt(ii))>50)?widthSplit(this.retxt(ii),50):this.retxt(ii));

    if(this.dlt==ii-1)
    {
      clearTimeout(this.hailang);
      this.golrcoll(0);
    }
    this.dlt = ii;
  }
  var bbw = 0;
  var ki;
  for(ki=0; ki<this.ddh.length && this.ddh[ki]<=tme; ki++){
    bbw += this.fjh[ki];
  }
  var kt = ki-1;
  var sc = ((ki<this.ddh.length)?this.ddh[ki]:this.dte) - this.ddh[kt];
  var tc = tme - this.ddh[kt];
  bbw -= this.fjh[kt] - tc / sc * this.fjh[kt];
  if(bbw>lrcbox.offsetWidth) bbw = lrcbox.offsetWidth;
  lrcbc.style.width = Math.round(bbw);
}

lrcClass.prototype.retxt = function(i)
{
  return (i<0 || i>=this.inr.length)?"":this.inr[i].n;
}

lrcClass.prototype.print = function(txt)
{
  lrcbox.innerText = txt;
  lrcbc.innerText = txt;
}

lrcClass.prototype.golrcoll = function(s)
{
  lrcoll.style.top = 25-(s++)*5;
  try{
	  lrcwt1.filters.alpha.opacity = 90-s*18;
	  lrcwt5.filters.alpha.opacity = s*18+10;
	  if(s<=5)
	  this.hailang = setTimeout(this.cnane+".golrcoll("+s+")",120);
  } catch(e) {}
}
-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#000000">
<div align="center" id="lrcollbox" style="overflow:hidden; height:100%; width:100%;">
<table border="0" cellspacing="0" cellpadding="0" width="100%" id="lrcoll" style="position:relative; top: 20px;">
  <tr><td nowrap height="20" align="center" id="lrcwt"></td></tr>
  <tr><td nowrap height="20" align="center" id="lrcwt1"></td></tr>
  <tr><td nowrap height="20" align="center" id="lrcwt2"></td></tr>
  <tr><td nowrap height="20" align="center" id="lrcwt3"></td></tr>
  <tr><td nowrap height="20" align="center" id="lrcwt4"></td></tr>
  <tr><td nowrap height="20" align="center" id="lrcwt5"></td></tr>
  <tr><td nowrap height="20" align="center" class="kong">
  	<table border="0" cellspacing="0" cellpadding="0">
		<tr><td nowrap height="20"><span id="lrcbox" style="width:0;">正在载入歌词..</span></td></tr>
		<tr style="position:relative; top: -20px; z-index:6;"><td nowrap height="20">
		<span id="lrcbc" style="overflow:hidden; width:0;"></span>
		</td></tr>
	</table>
</td></tr>
<tr style="position:relative; top: -20px;"><td nowrap height="20" align="center" id="lrcwt6"></td></tr>
<tr style="position:relative; top: -20px;"><td nowrap height="20" align="center" id="lrcwt7"></td></tr>
<tr style="position:relative; top: -20px;"><td nowrap height="20" align="center" id="lrcwt8"></td></tr>
<tr style="position:relative; top: -20px;"><td nowrap height="20" align="center" id="lrcwt9"></td></tr>
<tr style="position:relative; top: -20px;"><td nowrap height="20" align="center" id="lrcwt10"></td></tr>
</table>
</div>
<msie:download id="idDownload" style="behavior:url(#default#download)" />
<script language="javascript">
<!--
var lrcobj;
function LrcRun(m)
{
  lrcobj = new lrcClass(m);
  lrcobj.cnane = "lrcobj";
  lrcobj.haohaiplay = parent.Exobud;
  //lrcobj.oceanx = 0;	//0使用 Media Player，1使用 Real Player
  lrcobj.oceanx = playerobj;
  setInterval("lrcobj.run()",100);
}

function playertime(ACT){
	if (ACT=='1'){
		lrcobj.playptr++;
	}else if (ACT=='2'){
		lrcobj.playptr--;
	}else{
		lrcobj.playptr = 0;
	}
}

try { //IE支持此用法
	if(Browser.isIE)
	idDownload.startDownload("{:U('index/lyrics?id=' & req('id'))}",LrcRun);
} 
catch(e){
	//if(Browser.isIE)
	try { setLyricsRun(); } catch(e){ }
}
-->
</script>
</body>
</html>